<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>instanceof是如何判断的</title>
    <script>
        function Foo() {
            
        }
        
        /**
         * A instanceof B
         * 如果B函数的显示原型对象在A函数的原型链上，返回true，否则返回false
         */
        let foo = new Foo();
        console.log(foo instanceof Foo);
        console.log(foo instanceof Object);
        
        console.log(Object instanceof Function); // true
        console.log(Object instanceof Object); // true
        console.log(Function instanceof Function); // true
        console.log(Function instanceof Object); // true
    </script>
</head>
<body>
    
</body>
</html>
